class DituExample extends egret.DisplayObjectContainer {
    public tilesets: tiled.TMXTilesetGroup;
    public data: any;
    public constructor() {
        super();
        var self = this;
        var url: string = "resource/ditu.tmx";
        var urlLoader: egret.URLLoader = new egret.URLLoader();
        urlLoader.dataFormat = egret.URLLoaderDataFormat.TEXT;
        //load complete
        urlLoader.addEventListener(egret.Event.COMPLETE, function (event: egret.Event): void {
            this.data = egret.XML.parse(event.target.data);
            this.tmxTileMap = new tiled.TMXTilemap(2000, 2000, this.data, url);
            this.tmxTileMap.render();   
           self.addChild(this.tmxTileMap);
        }, url);
        urlLoader.load(new egret.URLRequest(url)); 
    }
}
 
           // var arr: any = this.tmxTileMap.getObjects();
            //得到当前层级对象info
           // var objData: any = arr[0]._childrens[0];
            //得到当前对象
           // var currentObj: egret.DisplayObject = objData.attributes
            //currentObj.x = 800;
            //打印对象属性
            // for (var key in currentObj) {
            //     console.log(key + ":" + currentObj[key]);
            // }         